import 'package:sow_app_core/src/usecase/novel_usecase.dart';

import '../../sow_app_core.dart';
import 'usecase.dart';

class ChapterGetChapterContentUseCase extends UseCase<void, NoParams> {
  final ChapterDetailPresenter _presenter;
  final NovelRepository _novelRepository;

  ChapterGetChapterContentUseCase(this._presenter, this._novelRepository);
  @override
  Future<void> call(NoParams params) async {
    await GetNovelChapterContentUseCase(_novelRepository)(_presenter.chapter!)
        .then((value) {
      _presenter.chapter = value;
      _presenter.onComplete();
    });
  }
}
